<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>

<style>
.error {
	color: #ff0000;
}

.errorblock {
	color: #000;
	background-color: #ffEEEE;
	border: 3px solid #ff0000;
	padding: 8px;
	margin: 16px;
}
</style>

</head>
<body>
	<h1>Add Account Type</h1>

	<form:form commandName="accountTypeForm" action="add" method="post">
		<form:errors path="*" cssClass="errorblock" element="div" />
		<table>
			<tr>
				<td>Name :</td>
				<td><form:input path="accountTypeDto.name"
						cssStyle="width: 185px;" /> <form:errors
						path="accountTypeDto.name" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Label1 :</td>
				<td><form:input path="accountTypeDto.label1"
						cssStyle="width: 185px;" /> <form:errors
						path="accountTypeDto.label1" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Label2 :</td>
				<td><form:input path="accountTypeDto.label2"
						cssStyle="width: 185px;" /> <form:errors
						path="accountTypeDto.label2" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Parent :</td>
				<td><form:select path="accountTypeDto.parentId">
						<form:option value="" label="NONE"></form:option>
						<c:forEach var="dto" items="${accountTypeForm.list}">
							<form:option value="${dto.id}" label="${dto.name}"></form:option>
						</c:forEach>
					</form:select></td>
			</tr>
		</table>
		<input type="submit" class="save" title="Save" value="Save" />
	</form:form>

</body>
</html>